﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace House_World
{
    
    class Mastro
    {
       public VertexPositionColor[] verts;
       public BasicEffect mastroEffect;

       public Mastro(GraphicsDevice graphicsDevice)
        {
            mastroEffect = new BasicEffect(graphicsDevice);
            verts = new[]
                {
                
                new VertexPositionColor(new Vector3(-0.5f,5.5f,0),Color.Black),
                new VertexPositionColor(new Vector3(0.5f,5.5f,0),Color.Black),
                new VertexPositionColor(new Vector3(-0.5f,-1,0),Color.Black),
                new VertexPositionColor(new Vector3(0.5f,-1,0),Color.Black),
              
                };
            mastroEffect = new BasicEffect(graphicsDevice);
            mastroEffect.World *= Matrix.CreateTranslation(new Vector3(0, 0, 0));
        }
        public void Draw(Camera camera,GraphicsDevice graphicsDevice)
        {
            mastroEffect.View = camera.View;
            mastroEffect.Projection = camera.Projector;
            mastroEffect.VertexColorEnabled = true;
            foreach (EffectPass pass in mastroEffect.CurrentTechnique.Passes)
            {
                pass.Apply();

                graphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.TriangleStrip, verts, 0, 2);
            }
        }

    }
}
